package com.wf.config;

import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author mpk
 * @since 2024/8/26 15:04:45
 */
@Slf4j
@Component
public class CleanDynamicRunner implements ApplicationRunner {


    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("启动成功");
        DynamicDataSourceContextHolder.clear();
    }
}
